Check that _Float16 is available before using it in openblas_config.h
authorDebian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>
Wed, 8 Apr 2026 14:43:38 +0000 (16:43 +0200)
committerSébastien Villemot <sebastien@debian.org>
Wed, 8 Apr 2026 14:43:38 +0000 (16:43 +0200)
Origin: upstream, https://github.com/OpenMathLib/OpenBLAS/commit/dc32a8a90f6e9169a6444826fcd55e0645db708c
                  https://github.com/OpenMathLib/OpenBLAS/commit/e926bb0523f1d001948a2214f213ec766d5d4414
Bug: https://github.com/OpenMathLib/OpenBLAS/issues/5747
Reviewed-by: Sébastien Villemot <sebastien@debian.org>
Last-Update: 2026-04-08

Fixes development package on armhf, s390x and sparc64.
Last-Update: 2026-04-08
Gbp-Pq: Name _Float16-redux.patch

openblas_config_template.h

index 660a7da0dc1c92f6fae52a90a3765d0095ad5dd3..e91cbeaf4eb4a015c4f9b2fa8aa3dd39ac8041fd 100644 (file)
@@ -43,7 +43,14 @@ typedef uint16_t bfloat16;
 #if defined(OPENBLAS_ARCH_POWER) || defined(OPENBLAS_ARCH_LOONGARCH64)
 typedef bfloat16 hfloat16;
 #else
+#define __STDC_WANT_IEC_60559_TYPES_EXT__
+#include <float.h>
+#ifdef FLT16_MAX
 typedef _Float16 hfloat16;
+#else
+#include <stdint.h>
+typedef uint16_t hfloat16;
+#endif
 #endif
 #else
 #include <stdint.h>